package com.example.testuser.service;

import com.example.testuser.entity.TestUser;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface TestUserService {

    List<TestUser> getAllUser();

    TestUser getUserByPk(String pkUser);

    TestUser getUserByCodeOrName(String code, String name);

    @Transactional
    void addOrUpdateUser(TestUser user);

    @Transactional
    void deleteUser(TestUser user);

    @Transactional
    void deleteUserByPk(String pkUser);

    List<TestUser> findListMySql(String identity);

    @Transactional
    List<?> getAllStreamUser();

    @Transactional
    List<TestUser> getAllStreamUser1();

    @Transactional
    List<TestUser> getAllStreamUser2();

    public List<TestUser> readAllBy() throws InterruptedException, ExecutionException;

}
